<extend name="Public/base"/>
<block name="content">
<div class="row-fluid">
    <!-- block -->
    <div class="block">
        <div class="navbar navbar-inner block-header">
            <div class="muted pull-left">导航管理</div>
        </div>
        <div class="block-content collapse in">
            <div class="span12">
                <p>
                    <a class="btn btn-success" href="{:U('Nav/add',array('pid'=>I('get.pid',0)))}">新增</a>
                    <button class="btn ajax-post confirm btn-success" url="{:U('del')}" target-form="ids">删 除</button>
                </p>
                <table class="table">
                    <thead>
                    <tr>
                        <th class="row-selected">
                            <input class="checkbox check-all" type="checkbox">
                        </th>
                        <th>ID</th>
                        <th>名称</th>
                        <th>上级菜单</th>
                        <th>分组</th>
                        <th>URL</th>
                        <th>排序</th>
                        <th>隐藏</th>
                        <th>操作</th>
                    </tr>
                    <notempty name="list">
                        <volist name="list" id="menu">
                            <tr>
                                <td><input class="ids row-selected" type="checkbox" name="id[]" value="{$menu.id}"></td>
                                <td>{$menu.id}</td>
                                <td>
                                    <a href="{:U('index?pid='.$menu['id'])}">{$menu.title}</a>
                                </td>
                                <td>{$menu.up_title|default='无'}</td>
                                <td>{$menu.group}</td>
                                <td>{$menu.url}</td>
                                <td>{$menu.sort}</td>
                                <td>
                                    <a href="{:U('toogleHide',array('id'=>$menu['id'],'value'=>abs($menu['hide']-1)))}" class="ajax-get">
                                        {$menu.hide_text}
                                    </a>
                                </td>
                                <td>
                                    <a title="编辑" href="{:U('edit?id='.$menu['id'])}">编辑</a>
                                    <a class="confirm ajax-get" title="删除" href="{:U('del?id='.$menu['id'])}">删除</a>
                                </td>
                            </tr>
                        </volist>
                        <else/>
                        <td colspan="10" class="text-center"> aOh! 暂时还没有内容! </td>
                    </notempty>
                </table>
            </div>
        </div>
    </div>
    <!-- /block -->
</div>
</block>